#ifndef SCHEDULER_TASK_H
#define SCHEDULER_TASK_H


#include "types.h"


struct task_resource {
	u32		deadline;				// scratch-buffer for deadline inheritance
									// function.
	void	*ptr;
};

struct task_resource_use{
	struct task_resource  *res_ptr;
	double	cost;
	u8		type;//0:shared 1:exclusive
	
};

typedef struct task_resource_use *task_resource_use_ptr;


struct Senfe_task_attr {

	u32		deadline;				// task deadline
	u32		period;					// task restart period
	u32		cputime;				// worst-case execution time 
	u32     advance;
	u32     delay;

	task_resource_use_ptr resource_use;	// resources
};

struct Senfe_res_table{
	CString name;
	u32 deadline;
};

#endif // SCHEDULER_TASK_H
